<template>
  <div class="footer">
    <ul class="module_nav">
      <router-link tag="li" :to="item.href" class="nav_i" v-for="(item, index) in navList" :key="index">
        <div class="iconfont icon" :class="item.icon"></div>
        <h3 class="title">{{ item.title }}</h3>
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'Banner',
  data () {
    return {
      navList: [
        {
          title: '首页',
          icon: 'iconshouye',
          href: '/home'
        },
        {
          title: '分类',
          icon: 'iconleimupinleifenleileibie',
          href: '/goods/1'
        },
        {
          title: '购物车',
          icon: 'icongouwuche',
          href: '/cart'
        },
        {
          title: '我的',
          icon: 'iconwode',
          href: '/profile'
        }
      ]
    }
  }
}
</script>

<style lang="less" scoped>
.footer {
  position: fixed;
  bottom: 0;
  z-index: 99;
  width: 15rem;
  height: 2rem;
  color: #333;
  background-color: #fff;
}
.module_nav {
  display: flex;
  width: 100%;
  height: 100%;
}
.nav_i {
  flex: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  .icon {
    font-size: .88rem;
  }
  .title {
    font-size: .56rem;
  }
}
.router-link-active {
  color: rgb(255, 20, 147);
}
</style>
